using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.Content;

namespace GameEngine.Shaders
{
    /// <summary>
    /// An extended Effect
    /// </summary>
    public class GEShader
    {
        private string asset;
        private Effect effect;

        public string Asset { get { return asset; } }
        public Effect Effect { get { return effect; } }

        /// <summary>
        /// Initializes a shader
        /// </summary>
        /// <param name="file">The location of the shader</param>
        public GEShader(string file)
        {
            asset = file;
        }

        public void LoadContent(ContentManager content)
        {
            effect = content.Load<Effect>(asset);
        }

        /// <summary>
        /// Set the shader's asset - shader will only be loaded the next time LoadContent is called
        /// </summary>
        /// <param name="file">The location of the shader</param>
        public void SetAsset(string file)
        {
            asset = file;
        }
    }
}
